package com.authine.cloudpivot.web.api.secondopen.service.impl;

import com.authine.cloudpivot.web.api.secondopen.dao.SharedPoolMapper;
import com.authine.cloudpivot.web.api.secondopen.domain.TableObj;
import com.authine.cloudpivot.web.api.secondopen.service.SharedPoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SharedPoolServiceImpl implements SharedPoolService {

    @Autowired
    private SharedPoolMapper sharedPoolMapper;

    @Override
    public void updateStatus(String tablename,String objId,String status) {
        sharedPoolMapper.updatestatus(tablename,objId,status);
    }

    @Override
    public void insertData(TableObj tableobj) {
        sharedPoolMapper.insertData(tableobj);
    }

    @Override
    public void updatePool(String id,String procode,String status) {
        sharedPoolMapper.updatePool(id,procode,status);
    }

    @Override
    public List<TableObj> getSharedPool(String processName,String sequenceNo) {
        return sharedPoolMapper.getSharedPool(processName,sequenceNo);
    }

    @Override
    public void deleteSharedPool(String id, String seqno) {
        sharedPoolMapper.deleteSharedPool(id,seqno);
    }

    @Override
    public String selectData(String id, String seqno) {
        return  sharedPoolMapper.selectData(id,seqno);
    }

    @Override
    public void deleteWorkToken(String instanceid) {
        sharedPoolMapper.deleteWorkToken(instanceid);
    }

    @Override
    public void updateSystemActivity(String instanceid) {
        sharedPoolMapper.updateSystemActivity(instanceid);
    }

    @Override
    public void deleteToDoTasks(String instanceid) {
        sharedPoolMapper.deleteToDoTasks(instanceid);
    }

    @Override
    public void setlqr(String tablename, String objid, String lqr) {
        sharedPoolMapper.setlqr(tablename,objid,lqr);
    }

    @Override
    public String selectDataStatus(String objId, String seqNo) {
        return sharedPoolMapper.selectDataStatus(objId,seqNo);
    }
}
